import { Image } from 'antd';

interface Props {
  src: string;
  visible: boolean;
  onVisibleChange: (val:boolean) => void;
}

const DocumentDisplay: React.FC<Props> = (props) => {
  const { src, visible, onVisibleChange } = props;

  return (
    <>
      <Image
        width={200}
        style={{ display: 'none' }}
        preview={{
          visible,
          src,
          onVisibleChange,
        }}
      />
    </>
  );
};

export default DocumentDisplay;
